<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>患者挂号</title>
    <link rel="stylesheet" href="css/bootstrap.css/bootstrap.min.css" />
    <script src="js/jquery.min.js"></script>
</head>
<body>

<div class="container">
    <div th:include="admin/header"></div>
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">患者挂号信息</h3>
        </div>
        <form th:action="@{/admin/search}" method="get" class="navbar-form navbar-right"
              style="padding-right: 50px;">
            <div class="form-group">
                <input type="text" class="form-control" name="mykey" placeholder="请输入关键词" />
            </div>
            <button type="submit" class="btn btn-default">搜索</button>
        </form>
        <div class="panel-body">
            <div class="table table-responsive">
                <table class="table table-bordered table-hover">
                    <tbody class="text-center">
                    <tr>
                        <th>序号</th>
                        <th>患者姓名</th>
                        <th>医生姓名</th>
                        <th>预约时间</th>
                        <th>挂号状态</th>
                    </tr>
                    <tr th:each="gty:${mzghList}">
                        <td th:text="${gty.id}"></td>
                        <td th:text="${gty.uname}"></td>
                        <td th:text="${gty.dname}"></td>
                        <td th:text="${gty.yyrq}"></td>
                        <td th:text="${#strings.equals(gty.status, '0') ? '待叫号' : (#strings.equals(gty.status, '1') ? '已叫号' : '')}">
                            <!-- 如果gty.status不是'0'也不是'1'，则不显示任何内容 -->
                        </td>
                    </tr>
                    <tr th:if="${currentPage != null}">
                        <td colspan="4" align="right">
                            <ul class="pagination">
                                <li><a>第<span th:text="${currentPage}" ></span>页</a></li>
                                <li><a>共<span th:text="${totalPage}" ></span>页</a></li>
                                <li>
											<span th:if="${currentPage} != 1" >
												<a th:href="@{admin/mzgh(currentPage=${currentPage - 1})}">上一页</a>
											</span>
                                    <span th:if="${currentPage} != ${totalPage}" >
												<a th:href="@{admin/mzgh(currentPage=${currentPage + 1})}">下一页</a>
											</span>
                                </li>
                            </ul>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</body>
</html>